home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
network
/
ka9q
/
nhclb120.zoo
/
test_tick.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-18
|
416b
|
24 lines
#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>
/*
* Use this program to determine the proper value of MSPTICK for
* your system.
*/
main() {
long old, curr, times();
struct tms foo;
float f;
old = times(&foo);
for (;;) {
sleep(1);
curr = times(&foo);
f = 1000.0/(float)(curr - old);
printf("%d actual value = %f, MSPTICK = %d\n", curr-old,
f, (int)(f + 0.5));
old = curr;
}
}